<?php
echo $this->adminToolBar('customer', 'index', '/customer/addcustomer/', '/customer/editcustomer/', '/customer/deletecustomer/');
?>
<?php
if(count($this->view_customers) > 0)
{
?>
<table border="1" width="98%" cellpadding="1" cellspacing="2" class="box-table-a">
	<tr>
		<th align="center" scope="col" width="3%">#</th>
		<th align="center" scope="col" width="10%">Customer Name</th>
		<th align="center" scope="col" width="12%">Customer Code</th>
		<th align="center" scope="col" width="18%">Project Type</th>
		<th align="center" scope="col" width="12%">Location</th>
		<th align="center" scope="col" width="10%">Member Since</th>
		<th align="center" scope="col" width="10%">Logo</th>
		<th align="center" scope="col" width="5%">Status</th>
		<th align="center" scope="col" width="3%">&nbsp;</th>
		<th align="center" scope="col" width="3%">&nbsp;</th>
	</tr>

<?php
foreach($this->view_customers as $customer_entry) : 
	$project_type = $customer_entry['project_type'];
	switch($project_type)
	{
		case "sap" :
			$project = "SAP";
			break;
		
		case "accpac" :
			$project = "Accpac";
			break;
			
		case "sap_development" :		
			$project = "SAP + Development";
			break;
			
		case "accpac_development" :	
			$project = "Accpac + Development";
			break;
			
		case "sap_support" :
			$project = "SAP Support Service";
			break;
			
		case "accpac_support" :
			$project = "Accpac Support Service";
			break;	
			
		case "devlopment" :
			$project = "Devlopment";
			break;	
	}
?>
	<tr>
	    <td align="center"><?php echo $customer_entry['customer_id']; ?></td>
	    <td><?php echo $customer_entry['customer_name']; ?></td>
	    <td><?php echo $customer_entry['customer_code']; ?></td>
	    <td align="center"><?php echo $project; ?></td>
	    <td align="center"><?php echo $customer_entry['city_name']; ?></td>	    
	    <td align="center"><?php echo $customer_entry['created_date']; ?></td>
	    <td align="center"><img src="/images/clients/thumbs/<?php echo $customer_entry['customer_logo']; ?>" /></td>
	    <td align="center"><?php echo $customer_entry['status']; ?></td>	    
	    <td align="center"><a href="javascript: void(0);" onclick="loadPage('/customer/edit/customer_id/<?php echo $customer_entry['customer_id']; ?>');" title="Edit"><img src="/images/icons/edit.gif" alt=""/></a></td>
	    <td align="center"><a href="javascript: void(0);" onclick="deleteCustomer('<?php echo $customer_entry['customer_id']; ?>');" title="Delete"><img src="/images/icons/disable.gif" alt=""/></a></td> 
	</tr>
<?php endforeach; ?>
</table>
<?php
} else {
?>
	<table border="0" width="98%" cellpadding="1" cellspacing="2">
		<tr>
			<td align="center" class="no_data">No records to show</td>
		</tr>
	</table>
<?php
}
?>
<div id="show_adduser_form" style="display: none;" title="Add User">
	<div id="table_content"></div>
</div>